<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="js/axios-0.18.0.js"></script>
    <script src="js/vue.js"></script>
</head>
<body>
<div id="app">
    <table class="altrowstable">
        <tr>
            <th>用户编码</th>
            <th>用户姓名</th>
            <th>真实姓名</th>
            <th>年龄</th>
            <th>性别</th>
            <th>出生日期</th>
            <th>删除操作</th>
        </tr>
        <tr v-for="user in users">
            <th>{{user.id}}</th>
            <th>{{user.userName}}</th>
            <th>{{user.name}}</th>
            <th>{{user.age}}</th>
            <th>{{user.sex}}</th>
            <th>{{user.birthday}}</th>
            <th>删除操作</th>
        </tr>
    </table>
</div>
</body>

    <script>
        new Vue({
            el: "#app",
            data: {
                users: []
            },
            methods: {
                findAll() {
                    //发送请求查询数据
                    axios.post("/user/findAll.do").then((res) => {
                        console.log(res);
                        this.users = res.data;
                    })
                }
            },
            created() {
                this.findAll();
            }
        })
    </script>

</html>